﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernateDemo.DAL" namespace="NHibernateDemo.DAL.Entity">
    <class name="FundBasic" table ="fundbasic" >
        <id name="FundId" column="FundId" type="string" length="10" unsaved-value="">
            <generator class="assigned" ></generator>
        </id>
        <property name="FundName" type="string" column="FundName"></property>
        <many-to-one name="Category" column="CategoryId"  not-null="true"   not-found="ignore" cascade="save-update"
                class="Category" />
        <bag name="Managers" table="management" generic="true"  inverse ="false"  cascade="all">
            <key column="FundId" />
            <many-to-many class="PersonBasic" column="PersonId"  />
        </bag>
    </class>
</hibernate-mapping>